﻿<%@ Page Language="C#" AutoEventWireup="true" MasterPageFile="~/RightFrame.Master"
    CodeBehind="UserManage.aspx.cs" Inherits="MyOA.UI.UserManage.UserManage" %>

<%@ Register Assembly="AspNetPager" Namespace="Wuqi.Webdiyer" TagPrefix="webdiyer" %>
<asp:Content ContentPlaceHolderID="cphTitle" ID="cphTitle" runat="server">
    您的位置：员工管理
</asp:Content>
<asp:Content ContentPlaceHolderID="cphContnent" ID="cphContent" runat="server">

    <script type="text/javascript" language="javascript">
    var Alert = ymPrompt.alert;
    var Error = ymPrompt.errorInfo;
    </script>

    <style>
            .headBackground
            {
            	height:16px;
             background-image:url("../../images/tab_14.gif");
            }
         </style>
    <asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>
    <asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Always">
        <ContentTemplate>
            <div class="body_title">员&nbsp;&nbsp;工&nbsp;&nbsp;管&nbsp;&nbsp;理</div>

            <br />
            <div style="width: 88%; height: 26px; text-align: right; padding-top: 6px">
                <asp:ImageButton ID="imgbtnAddBranchInfo" runat="server" ImageUrl="~/images/write.gif" />
                <asp:Button ID="btnAddUser" runat="server" CssClass="btn" Text="添加用户" Height="20px"
                    onMouseOver="document.getElementById(this.id).className='btnOver'" onMouseOut="document.getElementById(this.id).className='btnOut'"
                    OnClick="btnAddUser_Click" Width="56px" /></div>
            <div style="width: 99%; height: 240px;" align="center" id="DIV1">
                <asp:GridView ID="gvUserInfo" runat="server" AutoGenerateColumns="False" Width="657px"
                    BorderColor="#66CCFF" BorderWidth="1px" CellPadding="4" OnRowDataBound="gvUserInfo_RowDataBound"
                    OnRowCommand="gvUserInfo_RowCommand" DataKeyNames="UserId">
                    <Columns>
                        <asp:BoundField DataField="UserId" HeaderText="ID" Visible="False" />
                        <asp:BoundField DataField="LoginId" HeaderText="用户ID" HeaderStyle-CssClass="headBackground"/>
                        <asp:BoundField DataField="UserName" HeaderText="用户名" HeaderStyle-CssClass="headBackground"/>
                        <asp:TemplateField HeaderText="用户角色" HeaderStyle-CssClass="headBackground">
                            <EditItemTemplate>
                                <asp:TextBox ID="TextBox2" runat="server" Text='<%# Eval("Role.RoleName") %>'></asp:TextBox>
                            </EditItemTemplate>
                            <ItemTemplate>
                                <asp:Label ID="Label2" runat="server" Text='<%# Eval("Role.RoleName") %>'></asp:Label>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="用户状态" HeaderStyle-CssClass="headBackground">
                            <EditItemTemplate>
                                <asp:TextBox ID="TextBox1" runat="server" Text='<%# Eval("UserState.UserStateName") %>'></asp:TextBox>
                            </EditItemTemplate>
                            <ItemTemplate>
                                <asp:Label ID="Label1" runat="server" Text='<%# Eval("UserState.UserStateName") %>'></asp:Label>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="修改" HeaderStyle-CssClass="headBackground">
                            <ItemTemplate>
                                <asp:ImageButton ID="imgbtnUpdate" ImageUrl="~/images/edit.gif" CommandArgument='<%#Bind("UserId")%>'
                                    CommandName="userInfoUpdate" Width="16px" Height="15px" runat="server" />
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="删除" HeaderStyle-CssClass="headBackground">
                            <ItemTemplate>
                                <asp:ImageButton ID="imgbtnDelete" ImageUrl="~/images/delete.gif" CommandArgument='<%#Bind("UserId")%>'
                                    CommandName="userInfoDelete" Width="15px" Height="11px" runat="server" />
                            </ItemTemplate>
                        </asp:TemplateField>
                    </Columns>
                </asp:GridView>
                <webdiyer:AspNetPager ID="anpUserInfo" runat="server" OnPageChanged="anpUserInfo_PageChanged"
                    CssClass="paginator" PageSize="5" ShowNavigationToolTip="True" PageIndexBoxType="DropDownList"
                    PagingButtonSpacing="10px" ShowPageIndexBox="Always">
                </webdiyer:AspNetPager>
            </div>
        </ContentTemplate>
    </asp:UpdatePanel>
</asp:Content>
